<script src="web/assets/plugins/bootstrap-select2/select2.min.js" type="text/javascript"></script>
<script src="web/assets/plugins/jquery-datatable/js/jquery.dataTables.min.js" type="text/javascript" ></script>
<script src="web/assets/js/table_configuracion.js" type="text/javascript"></script>
<script src="./fuentes/view/bleu/js/script_ajax_bleu_specific.js" type="text/javascript"></script>
<script src="web/assets/js/validadores_numericos.js" type="text/javascript"></script> 

<div class="clearfix"></div>
<div class="content">  
    
    <!-- Modal -->
    <div class="modal fade" id="myModalBleuSpecificADD" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h4 id="myModalLabel" class="semi-bold">Persona Bleu</h4>

                </div>

                <div class="modal-body">
               
                    <form  action="./fuentes/controller/BleuSpecific.php" id="formBleuSpecific" name="formBleuSpecific" autocomplete="off" > 
                        <?php require_once '/FormBleuSpecific.php'; ?>
                       
                    </form> 
                
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal-dialog -->
        </div>
        <!-- /.modal -->
    </div>
    
    
    <div class="row" id="movimiento">
        <div class="col-md-12">
            <div class="grid simple ">
                <div class="grid-title no-border">
                    <h4><span class="semi-bold">Listado de Personas Bleu <?php echo $tipoListado; ?></span></h4>
                    <span style="float:right;">
                        <input type="hidden" name="tipoListado"  id="tipoListado"  class="form-control" value="<?php echo $tipoListado; ?>" >
                        <select class="form-control" id="cmbTipoListado" name="cmbTipoListado">
                            <option value="BLEU" <?php if ($tipoListado == 'BLEU') echo "selected";?> >SOLO PERSONAS BLEU</option>
                            <option value="NOBLEU" <?php if ($tipoListado == 'NOBLEU') echo "selected";?> >LAS DEMAS (NO BLEU)</option>
                            <option value="TODAS" <?php if ($tipoListado == 'TODAS') echo "selected";?> >TODAS</option>
                        </select>
                    </span>
                    
                    <div class="labelRight" id="error">	</div>
                </div>
                <div class="grid-body no-border">

                    <table class="table table-hover no-more-tables table-condensed  " id="bleuSpecificTABLE">
                        <thead>
                            <tr>
                                <th style="width:3%">Codigo </th>
                                <th style="width:20%">Nombre </th>
                                <th class='text-center' style="width:4%">Documento</th>
                                <th class='text-right' style="width:2%">Puntos</th>
                                <th class='text-center' style="width:2%">Miembro</th>
                                <th class='text-center' style="width:2%">Invitado</th>
                                <th class='text-center' style="width:2%">Accion</th>
                               
                            </tr>
                        </thead>
                        <tbody id="bleuSpecificList">
                            <?php                            
                            if ($bleuSpecifics) {
                                foreach ($bleuSpecifics as $dato) {
                                    echo "<tr>"
                                            ."<td>".$dato["codigo"]."</td>"
                                            ."<td>".$dato["apenom"]."</td>"
                                            ."<td class='text-center'>".$dato["documento"]."</td>"
                                            ."<td class='text-right'>". number_format($dato["puntos"], 0, "", ".") ."</td>"
                                            ."<td class='text-center'>". getLabel($dato["miembro"])."</td>"
                                            ."<td class='text-center'>". getLabel($dato["invitado"])."</td>"
                                            ."<td class='text-center'><button class='btn btn-success btn-xs btn-mini' onclick='editDatos(" . $dato["persona_id"] . ")' title='Editar' ><i class='fa fa-pencil'></i></button></td>"
                                        ."</tr>";
                                }
                            } 
                            function getLabel($yes) {
                                if($yes) return "<span class='label label-success'>SI</span>";
                                else return "<span class='label label-warning'>NO</span>";
                            }
                            ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <!-- END PAGE --> 
</div>




